package com.luo.gmall.pms.vo;

import com.alibaba.nacos.client.naming.utils.CollectionUtils;
import com.alibaba.nacos.client.utils.StringUtils;
import com.luo.gmall.pms.entity.SpuAttrValueEntity;

import java.util.List;

/**
 * @author Zoro
 * @date 2021年11月03
 */
public class SpuAttrValueVo extends SpuAttrValueEntity {


    public void setValueSelected(List<String> valueSelected) {
        // 如果集合为空就不设置
        if (CollectionUtils.isEmpty(valueSelected)) {
            return;
        }
        this.setAttrValue(StringUtils.join(valueSelected, ";"));
    }
}
